package org.cskt.sl.entity;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class BuyGoodsExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public BuyGoodsExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andBgidIsNull() {
            addCriterion("bgid is null");
            return (Criteria) this;
        }

        public Criteria andBgidIsNotNull() {
            addCriterion("bgid is not null");
            return (Criteria) this;
        }

        public Criteria andBgidEqualTo(Integer value) {
            addCriterion("bgid =", value, "bgid");
            return (Criteria) this;
        }

        public Criteria andBgidNotEqualTo(Integer value) {
            addCriterion("bgid <>", value, "bgid");
            return (Criteria) this;
        }

        public Criteria andBgidGreaterThan(Integer value) {
            addCriterion("bgid >", value, "bgid");
            return (Criteria) this;
        }

        public Criteria andBgidGreaterThanOrEqualTo(Integer value) {
            addCriterion("bgid >=", value, "bgid");
            return (Criteria) this;
        }

        public Criteria andBgidLessThan(Integer value) {
            addCriterion("bgid <", value, "bgid");
            return (Criteria) this;
        }

        public Criteria andBgidLessThanOrEqualTo(Integer value) {
            addCriterion("bgid <=", value, "bgid");
            return (Criteria) this;
        }

        public Criteria andBgidIn(List<Integer> values) {
            addCriterion("bgid in", values, "bgid");
            return (Criteria) this;
        }

        public Criteria andBgidNotIn(List<Integer> values) {
            addCriterion("bgid not in", values, "bgid");
            return (Criteria) this;
        }

        public Criteria andBgidBetween(Integer value1, Integer value2) {
            addCriterion("bgid between", value1, value2, "bgid");
            return (Criteria) this;
        }

        public Criteria andBgidNotBetween(Integer value1, Integer value2) {
            addCriterion("bgid not between", value1, value2, "bgid");
            return (Criteria) this;
        }

        public Criteria andDateIsNull() {
            addCriterion("date is null");
            return (Criteria) this;
        }

        public Criteria andDateIsNotNull() {
            addCriterion("date is not null");
            return (Criteria) this;
        }

        public Criteria andDateEqualTo(Date value) {
            addCriterion("date =", value, "date");
            return (Criteria) this;
        }

        public Criteria andDateNotEqualTo(Date value) {
            addCriterion("date <>", value, "date");
            return (Criteria) this;
        }

        public Criteria andDateGreaterThan(Date value) {
            addCriterion("date >", value, "date");
            return (Criteria) this;
        }

        public Criteria andDateGreaterThanOrEqualTo(Date value) {
            addCriterion("date >=", value, "date");
            return (Criteria) this;
        }

        public Criteria andDateLessThan(Date value) {
            addCriterion("date <", value, "date");
            return (Criteria) this;
        }

        public Criteria andDateLessThanOrEqualTo(Date value) {
            addCriterion("date <=", value, "date");
            return (Criteria) this;
        }

        public Criteria andDateIn(List<Date> values) {
            addCriterion("date in", values, "date");
            return (Criteria) this;
        }

        public Criteria andDateNotIn(List<Date> values) {
            addCriterion("date not in", values, "date");
            return (Criteria) this;
        }

        public Criteria andDateBetween(Date value1, Date value2) {
            addCriterion("date between", value1, value2, "date");
            return (Criteria) this;
        }

        public Criteria andDateNotBetween(Date value1, Date value2) {
            addCriterion("date not between", value1, value2, "date");
            return (Criteria) this;
        }

        public Criteria andBgtypeIsNull() {
            addCriterion("bgtype is null");
            return (Criteria) this;
        }

        public Criteria andBgtypeIsNotNull() {
            addCriterion("bgtype is not null");
            return (Criteria) this;
        }

        public Criteria andBgtypeEqualTo(String value) {
            addCriterion("bgtype =", value, "bgtype");
            return (Criteria) this;
        }

        public Criteria andBgtypeNotEqualTo(String value) {
            addCriterion("bgtype <>", value, "bgtype");
            return (Criteria) this;
        }

        public Criteria andBgtypeGreaterThan(String value) {
            addCriterion("bgtype >", value, "bgtype");
            return (Criteria) this;
        }

        public Criteria andBgtypeGreaterThanOrEqualTo(String value) {
            addCriterion("bgtype >=", value, "bgtype");
            return (Criteria) this;
        }

        public Criteria andBgtypeLessThan(String value) {
            addCriterion("bgtype <", value, "bgtype");
            return (Criteria) this;
        }

        public Criteria andBgtypeLessThanOrEqualTo(String value) {
            addCriterion("bgtype <=", value, "bgtype");
            return (Criteria) this;
        }

        public Criteria andBgtypeLike(String value) {
            addCriterion("bgtype like", value, "bgtype");
            return (Criteria) this;
        }

        public Criteria andBgtypeNotLike(String value) {
            addCriterion("bgtype not like", value, "bgtype");
            return (Criteria) this;
        }

        public Criteria andBgtypeIn(List<String> values) {
            addCriterion("bgtype in", values, "bgtype");
            return (Criteria) this;
        }

        public Criteria andBgtypeNotIn(List<String> values) {
            addCriterion("bgtype not in", values, "bgtype");
            return (Criteria) this;
        }

        public Criteria andBgtypeBetween(String value1, String value2) {
            addCriterion("bgtype between", value1, value2, "bgtype");
            return (Criteria) this;
        }

        public Criteria andBgtypeNotBetween(String value1, String value2) {
            addCriterion("bgtype not between", value1, value2, "bgtype");
            return (Criteria) this;
        }

        public Criteria andPriceIsNull() {
            addCriterion("price is null");
            return (Criteria) this;
        }

        public Criteria andPriceIsNotNull() {
            addCriterion("price is not null");
            return (Criteria) this;
        }

        public Criteria andPriceEqualTo(Float value) {
            addCriterion("price =", value, "price");
            return (Criteria) this;
        }

        public Criteria andPriceNotEqualTo(Float value) {
            addCriterion("price <>", value, "price");
            return (Criteria) this;
        }

        public Criteria andPriceGreaterThan(Float value) {
            addCriterion("price >", value, "price");
            return (Criteria) this;
        }

        public Criteria andPriceGreaterThanOrEqualTo(Float value) {
            addCriterion("price >=", value, "price");
            return (Criteria) this;
        }

        public Criteria andPriceLessThan(Float value) {
            addCriterion("price <", value, "price");
            return (Criteria) this;
        }

        public Criteria andPriceLessThanOrEqualTo(Float value) {
            addCriterion("price <=", value, "price");
            return (Criteria) this;
        }

        public Criteria andPriceIn(List<Float> values) {
            addCriterion("price in", values, "price");
            return (Criteria) this;
        }

        public Criteria andPriceNotIn(List<Float> values) {
            addCriterion("price not in", values, "price");
            return (Criteria) this;
        }

        public Criteria andPriceBetween(Float value1, Float value2) {
            addCriterion("price between", value1, value2, "price");
            return (Criteria) this;
        }

        public Criteria andPriceNotBetween(Float value1, Float value2) {
            addCriterion("price not between", value1, value2, "price");
            return (Criteria) this;
        }

        public Criteria andIntegralIsNull() {
            addCriterion("integral is null");
            return (Criteria) this;
        }

        public Criteria andIntegralIsNotNull() {
            addCriterion("integral is not null");
            return (Criteria) this;
        }

        public Criteria andIntegralEqualTo(Integer value) {
            addCriterion("integral =", value, "integral");
            return (Criteria) this;
        }

        public Criteria andIntegralNotEqualTo(Integer value) {
            addCriterion("integral <>", value, "integral");
            return (Criteria) this;
        }

        public Criteria andIntegralGreaterThan(Integer value) {
            addCriterion("integral >", value, "integral");
            return (Criteria) this;
        }

        public Criteria andIntegralGreaterThanOrEqualTo(Integer value) {
            addCriterion("integral >=", value, "integral");
            return (Criteria) this;
        }

        public Criteria andIntegralLessThan(Integer value) {
            addCriterion("integral <", value, "integral");
            return (Criteria) this;
        }

        public Criteria andIntegralLessThanOrEqualTo(Integer value) {
            addCriterion("integral <=", value, "integral");
            return (Criteria) this;
        }

        public Criteria andIntegralIn(List<Integer> values) {
            addCriterion("integral in", values, "integral");
            return (Criteria) this;
        }

        public Criteria andIntegralNotIn(List<Integer> values) {
            addCriterion("integral not in", values, "integral");
            return (Criteria) this;
        }

        public Criteria andIntegralBetween(Integer value1, Integer value2) {
            addCriterion("integral between", value1, value2, "integral");
            return (Criteria) this;
        }

        public Criteria andIntegralNotBetween(Integer value1, Integer value2) {
            addCriterion("integral not between", value1, value2, "integral");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}